home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Hardware / Mac OS USB DDK / Mac OS USB DDK 1.4.1 / Examples / CompositeClassDriver / CompositeDriverDescription.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-25  |  2.2 KB  |  74 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        CompositeDriverDescription.c
  3.  
  4.     Contains:    Composite Class Driver Definition Header
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1997-1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10. */
  11.  
  12. #include <Types.h>
  13. #include <Devices.h>
  14. #include <DriverServices.h>
  15. #include <USB.h>
  16.  
  17.  
  18. #include "CompositeClassDriver.h"
  19. #include "CompositeClassVersion.h"
  20.  
  21.  
  22. //------------------------------------------------------
  23. //
  24. //    This is the driver description structure that the expert looks for first.
  25. //  If it's here, the information within is used to match the driver
  26. //  to the device whose descriptor was passed to the expert.
  27. //    Information in this block is also used by the expert when an
  28. //  entry is created in the Name Registry.
  29. //
  30. //------------------------------------------------------
  31. USBDriverDescription    TheUSBDriverDescription = 
  32. {
  33.     // Signature info
  34.     kTheUSBDriverDescriptionSignature,
  35.     kInitialUSBDriverDescriptor,
  36.     
  37.     // Device Info
  38.     0,                                        // vendor = not device specific
  39.     0,                                        // product = not device specific
  40.     0,                                        // version of product = not device specific
  41.     0,                                        // protocol = not device specific
  42.     
  43.     // Interface Info    (* I don't think this would always be required...*)                
  44.     0,                                        // Configuration Value
  45.     0,                                        // Interface Number
  46.     0,                                        // Interface Class
  47.     0,                                         // Interface SubClass
  48.     0,                                        // Interface Protocol
  49.         
  50.     
  51.     // Driver Info
  52.     "\pUSBCompositeDevice"kCMPStringVersShort,    // Driver name for Name Registry
  53.     kUSBCompositeClass,                            // Device Class  (from USBDeviceDefines.h)
  54.     kUSBCompositeSubClass,                        // Device Subclass 
  55.     kCMPHexMajorVers, 
  56.     kCMPHexMinorVers, 
  57.     kCMPCurrentRelease, 
  58.     kCMPReleaseStage,                        // version of driver
  59.     
  60.     // Driver Loading Info
  61.     kUSBDoNotMatchInterface                    // Please don't load us as an interface driver.
  62. };
  63.  
  64. USBClassDriverPluginDispatchTable TheClassDriverPluginDispatchTable =
  65. {
  66.     kClassDriverPluginVersion,                // Version of this structure
  67.     CompositeDriverValidateHW,                // Hardware Validation Procedure
  68.     CompositeDriverInitialize,                // Initialization Procedure
  69.     CompositeDriverInitInterface,            // Interface Initialization Procedure
  70.     CompositeDriverFinalize,                // Finalization Procedure
  71.     CompositeDriverNotifyProc                // Driver Notification Procedure
  72. };
  73.  
  74.